<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0" />
    <title></title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        .container{
            width: 100%;
            margin: 0 auto;
            box-sizing: border-box;
        }
        a{
            width: 200px;
            height: 200px;
            display: block;
            -webkit-tap-highlight-color: transparent;
            background: red;
        }
    </style>
</head>
<body>
<div class="container">
    <a href="javascript:;"></a>
</div>
<script>
    /*获取a*/
    var dom = document.querySelector('a');
    /*怎么绑定事件呢？*/

    /*手指刚刚触摸到屏幕的时候触发*/
    dom.addEventListener('touchstart',function(e){
        console.log('touchstart');
        console.log(e);
    });

    /*当手指在屏幕上滑动时连续触发*/
    dom.addEventListener('touchmove',function(e){
        console.log('touchmove');
        console.log(e);
    });

    /*当手指在离开屏幕的时候触发*/
    dom.addEventListener('touchend',function(e){
        console.log('touchend');
        console.log(e);
    });

    /*click  在移动端会有300ms左右的延时*/
    dom.addEventListener('click',function(e){
        console.log('click');
        console.log(e);
    });



</script>
</body>
</html>